package com.mercury.ec.framework.air.core.client.impl.sunstn.dto.raw;

import com.mercury.ec.framework.air.core.client.impl.sunstn.dto.SunstnCommonReqDTO;
import com.mercury.ec.framework.air.core.client.impl.sunstn.jaxb.adapter.DecodeHex2XmlAdapter;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 * RAW Request DTO
 *
 * @author hesx
 */
@Data
@NoArgsConstructor
public class SunstnRawReqDTO extends SunstnCommonReqDTO {
    /**
     * 待发送指令的 16 进制编码，多行指令\r 分隔（16 进制的 0D）
     */
    @XmlJavaTypeAdapter(DecodeHex2XmlAdapter.class)
    private String ins;

    public SunstnRawReqDTO(String ins) {
        this.ins = ins;
    }

    @Override
    public String getCmd() {
        return "raw";
    }
}
